#include <iostream>
#include <cstdio>
#include <cstdlib>
#define MAXSIZE 1024*1024
using namespace std;
char arr[MAXSIZE];
int main(int argc,char *argv []){
	int ch;
	FILE *fp1,*fp2;
	unsigned long count = 0;
#if 0	
	if(argc !=2){
		printf("Usage:%s fileName\n",argv[0]);
		exit(EXIT_FAILURE);
	
	}
#endif
	fp1 = fopen(argv[1],"r+w");
	fp2 = fopen(argv[2],"r+w");
	if(fp1 ==NULL){
	
		printf("Can't open %s\n",argv[1]);
		exit(EXIT_FAILURE);
	}
	int i = 0;
	while((ch = getc(fp1))!=EOF){
		arr[i]=ch;
		i++;
		count++;
	}
	fclose(fp1);
	fclose(fp2);

	for(i=0;i<count;i++){
		cout<<arr[i]<<" ";
	}
	printf("FIle %s has %lu character\n",argv[1],count);
	return 0;

}








